<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMimeFilterYenc: GMime 3.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GMime 3.0 Reference Manual">
<link rel="up" href="Filters.html" title="Stream Filters">
<link rel="prev" href="GMimeFilterWindows.html" title="GMimeFilterWindows">
<link rel="next" href="DataWrappers.html" title="Data Wrappers">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GMimeFilterYenc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GMimeFilterYenc.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="Filters.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GMimeFilterWindows.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="DataWrappers.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GMimeFilterYenc"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GMimeFilterYenc.top_of_page"></a>GMimeFilterYenc</span></h2>
<p>GMimeFilterYenc — yEncode or yDecode</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GMimeFilterYenc.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-filter-yenc-new" title="g_mime_filter_yenc_new ()">g_mime_filter_yenc_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-filter-yenc-set-state" title="g_mime_filter_yenc_set_state ()">g_mime_filter_yenc_set_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-filter-yenc-set-crc" title="g_mime_filter_yenc_set_crc ()">g_mime_filter_yenc_set_crc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint32</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-filter-yenc-get-crc" title="g_mime_filter_yenc_get_crc ()">g_mime_filter_yenc_get_crc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint32</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-filter-yenc-get-pcrc" title="g_mime_filter_yenc_get_pcrc ()">g_mime_filter_yenc_get_pcrc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-FINAL:CAPS" title="GMIME_YENCODE_CRC_FINAL()">GMIME_YENCODE_CRC_FINAL</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">size_t</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-ydecode-step" title="g_mime_ydecode_step ()">g_mime_ydecode_step</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">size_t</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-yencode-step" title="g_mime_yencode_step ()">g_mime_yencode_step</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">size_t</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterYenc.html#g-mime-yencode-close" title="g_mime_yencode_close ()">g_mime_yencode_close</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMimeFilterYenc-struct" title="struct GMimeFilterYenc">GMimeFilterYenc</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-INIT:CAPS" title="GMIME_YENCODE_CRC_INIT">GMIME_YENCODE_CRC_INIT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-STATE-INIT:CAPS" title="GMIME_YENCODE_STATE_INIT">GMIME_YENCODE_STATE_INIT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-INIT:CAPS" title="GMIME_YDECODE_STATE_INIT">GMIME_YDECODE_STATE_INIT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-EOLN:CAPS" title="GMIME_YDECODE_STATE_EOLN">GMIME_YDECODE_STATE_EOLN</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-ESCAPE:CAPS" title="GMIME_YDECODE_STATE_ESCAPE">GMIME_YDECODE_STATE_ESCAPE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-END:CAPS" title="GMIME_YDECODE_STATE_END">GMIME_YDECODE_STATE_END</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-BEGIN:CAPS" title="GMIME_YDECODE_STATE_BEGIN">GMIME_YDECODE_STATE_BEGIN</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-DECODE:CAPS" title="GMIME_YDECODE_STATE_DECODE">GMIME_YDECODE_STATE_DECODE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GMimeFilterYenc.html#GMIME-YDECODE-STATE-PART:CAPS" title="GMIME_YDECODE_STATE_PART">GMIME_YDECODE_STATE_PART</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> <a class="link" href="GMimeFilter.html" title="GMimeFilter">GMimeFilter</a>
        <span class="lineart">╰──</span> GMimeFilterYenc
</pre>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.description"></a><h2>Description</h2>
<p>A <a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="type">GMimeFilter</span></a> used to encode or decode the Usenet yEncoding.</p>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-mime-filter-yenc-new"></a><h3>g_mime_filter_yenc_new ()</h3>
<pre class="programlisting"><a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *
g_mime_filter_yenc_new (<em class="parameter"><code><span class="type">gboolean</span> encode</code></em>);</pre>
<p>Creates a new yEnc filter.</p>
<div class="refsect3">
<a name="g-mime-filter-yenc-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>encode</p></td>
<td class="parameter_description"><p>encode vs decode</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-yenc-new.returns"></a><h4>Returns</h4>
<p> a new yEnc filter.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-yenc-set-state"></a><h3>g_mime_filter_yenc_set_state ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_filter_yenc_set_state (<em class="parameter"><code><a class="link" href="GMimeFilterYenc.html" title="GMimeFilterYenc"><span class="type">GMimeFilterYenc</span></a> *yenc</code></em>,
                              <em class="parameter"><code><span class="type">int</span> state</code></em>);</pre>
<p>Sets the current state of the yencoder/ydecoder</p>
<div class="refsect3">
<a name="g-mime-filter-yenc-set-state.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>yenc</p></td>
<td class="parameter_description"><p>yEnc filter</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>encode/decode state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-yenc-set-crc"></a><h3>g_mime_filter_yenc_set_crc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_filter_yenc_set_crc (<em class="parameter"><code><a class="link" href="GMimeFilterYenc.html" title="GMimeFilterYenc"><span class="type">GMimeFilterYenc</span></a> *yenc</code></em>,
                            <em class="parameter"><code><span class="type">guint32</span> crc</code></em>);</pre>
<p>Sets the current crc32 value on the yEnc filter <em class="parameter"><code>yenc</code></em>
 to <em class="parameter"><code>crc</code></em>
.</p>
<div class="refsect3">
<a name="g-mime-filter-yenc-set-crc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>yenc</p></td>
<td class="parameter_description"><p>yEnc filter</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crc</p></td>
<td class="parameter_description"><p>crc32</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-yenc-get-crc"></a><h3>g_mime_filter_yenc_get_crc ()</h3>
<pre class="programlisting"><span class="returnvalue">guint32</span>
g_mime_filter_yenc_get_crc (<em class="parameter"><code><a class="link" href="GMimeFilterYenc.html" title="GMimeFilterYenc"><span class="type">GMimeFilterYenc</span></a> *yenc</code></em>);</pre>
<p>Get the computed crc or (guint32) -1 on fail.</p>
<div class="refsect3">
<a name="g-mime-filter-yenc-get-crc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>yenc</p></td>
<td class="parameter_description"><p>yEnc filter</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-yenc-get-crc.returns"></a><h4>Returns</h4>
<p> the computed crc or (guint32) -1 on fail.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-yenc-get-pcrc"></a><h3>g_mime_filter_yenc_get_pcrc ()</h3>
<pre class="programlisting"><span class="returnvalue">guint32</span>
g_mime_filter_yenc_get_pcrc (<em class="parameter"><code><a class="link" href="GMimeFilterYenc.html" title="GMimeFilterYenc"><span class="type">GMimeFilterYenc</span></a> *yenc</code></em>);</pre>
<p>Get the computed part crc or (guint32) -1 on fail.</p>
<div class="refsect3">
<a name="g-mime-filter-yenc-get-pcrc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>yenc</p></td>
<td class="parameter_description"><p>yEnc filter</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-yenc-get-pcrc.returns"></a><h4>Returns</h4>
<p> the computed part crc or (guint32) -1 on fail.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YENCODE-CRC-FINAL:CAPS"></a><h3>GMIME_YENCODE_CRC_FINAL()</h3>
<pre class="programlisting">#define GMIME_YENCODE_CRC_FINAL(crc) (~crc)
</pre>
<p>Gets the final crc value from <em class="parameter"><code>crc</code></em>
.</p>
<div class="refsect3">
<a name="GMIME-YENCODE-CRC-FINAL.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>crc</p></td>
<td class="parameter_description"><p>crc or pcrc state variable</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-ydecode-step"></a><h3>g_mime_ydecode_step ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span>
g_mime_ydecode_step (<em class="parameter"><code>const unsigned <span class="type">char</span> *inbuf</code></em>,
                     <em class="parameter"><code><span class="type">size_t</span> inlen</code></em>,
                     <em class="parameter"><code>unsigned <span class="type">char</span> *outbuf</code></em>,
                     <em class="parameter"><code><span class="type">int</span> *state</code></em>,
                     <em class="parameter"><code><span class="type">guint32</span> *pcrc</code></em>,
                     <em class="parameter"><code><span class="type">guint32</span> *crc</code></em>);</pre>
<p>Performs a 'decode step' on a chunk of yEncoded data of length
<em class="parameter"><code>inlen</code></em>
 pointed to by <em class="parameter"><code>inbuf</code></em>
 and writes to <em class="parameter"><code>outbuf</code></em>
. Assumes the =ybegin
and =ypart lines have already been stripped off.</p>
<p>To get the crc32 value of the part, use <a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-FINAL:CAPS" title="GMIME_YENCODE_CRC_FINAL()"><span class="type">GMIME_YENCODE_CRC_FINAL</span></a>
(<em class="parameter"><code>pcrc</code></em>
). If there are more parts, you should reuse <em class="parameter"><code>crc</code></em>
 without
re-initializing. Once all parts have been decoded, you may get the
combined crc32 value of all the parts using <a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-FINAL:CAPS" title="GMIME_YENCODE_CRC_FINAL()"><span class="type">GMIME_YENCODE_CRC_FINAL</span></a>
(<em class="parameter"><code>crc</code></em>
).</p>
<div class="refsect3">
<a name="g-mime-ydecode-step.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>inbuf</p></td>
<td class="parameter_description"><p>input buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inlen</p></td>
<td class="parameter_description"><p>input buffer length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>outbuf</p></td>
<td class="parameter_description"><p>output buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>ydecode state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pcrc</p></td>
<td class="parameter_description"><p>part crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crc</p></td>
<td class="parameter_description"><p>crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-ydecode-step.returns"></a><h4>Returns</h4>
<p> the number of bytes decoded.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-yencode-step"></a><h3>g_mime_yencode_step ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span>
g_mime_yencode_step (<em class="parameter"><code>const unsigned <span class="type">char</span> *inbuf</code></em>,
                     <em class="parameter"><code><span class="type">size_t</span> inlen</code></em>,
                     <em class="parameter"><code>unsigned <span class="type">char</span> *outbuf</code></em>,
                     <em class="parameter"><code><span class="type">int</span> *state</code></em>,
                     <em class="parameter"><code><span class="type">guint32</span> *pcrc</code></em>,
                     <em class="parameter"><code><span class="type">guint32</span> *crc</code></em>);</pre>
<p>Performs an yEncode 'encode step' on a chunk of raw data of length
<em class="parameter"><code>inlen</code></em>
 pointed to by <em class="parameter"><code>inbuf</code></em>
 and writes to <em class="parameter"><code>outbuf</code></em>
.</p>
<p><em class="parameter"><code>state</code></em>
 should be initialized to <a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-STATE-INIT:CAPS" title="GMIME_YENCODE_STATE_INIT"><span class="type">GMIME_YENCODE_STATE_INIT</span></a> before
beginning making the first call to this function. Subsequent calls
should reuse <em class="parameter"><code>state</code></em>
.</p>
<p>Along the same lines, <em class="parameter"><code>pcrc</code></em>
 and <em class="parameter"><code>crc</code></em>
 should be initialized to
<a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-INIT:CAPS" title="GMIME_YENCODE_CRC_INIT"><span class="type">GMIME_YENCODE_CRC_INIT</span></a> before using.</p>
<div class="refsect3">
<a name="g-mime-yencode-step.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>inbuf</p></td>
<td class="parameter_description"><p>input buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inlen</p></td>
<td class="parameter_description"><p>input buffer length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>outbuf</p></td>
<td class="parameter_description"><p>output buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>yencode state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pcrc</p></td>
<td class="parameter_description"><p>part crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crc</p></td>
<td class="parameter_description"><p>crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-yencode-step.returns"></a><h4>Returns</h4>
<p> the number of bytes encoded.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-yencode-close"></a><h3>g_mime_yencode_close ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span>
g_mime_yencode_close (<em class="parameter"><code>const unsigned <span class="type">char</span> *inbuf</code></em>,
                      <em class="parameter"><code><span class="type">size_t</span> inlen</code></em>,
                      <em class="parameter"><code>unsigned <span class="type">char</span> *outbuf</code></em>,
                      <em class="parameter"><code><span class="type">int</span> *state</code></em>,
                      <em class="parameter"><code><span class="type">guint32</span> *pcrc</code></em>,
                      <em class="parameter"><code><span class="type">guint32</span> *crc</code></em>);</pre>
<p>Call this function when finished encoding data with
<a class="link" href="GMimeFilterYenc.html#g-mime-yencode-step" title="g_mime_yencode_step ()"><code class="function">g_mime_yencode_step()</code></a> to flush off the remaining state.</p>
<p><a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-FINAL:CAPS" title="GMIME_YENCODE_CRC_FINAL()"><span class="type">GMIME_YENCODE_CRC_FINAL</span></a> (<em class="parameter"><code>pcrc</code></em>
) will give you the crc32 of the
encoded "part". If there are more "parts" to encode, you should
re-use <em class="parameter"><code>crc</code></em>
 when encoding the next "parts" and then use
<a class="link" href="GMimeFilterYenc.html#GMIME-YENCODE-CRC-FINAL:CAPS" title="GMIME_YENCODE_CRC_FINAL()"><span class="type">GMIME_YENCODE_CRC_FINAL</span></a> (<em class="parameter"><code>crc</code></em>
) to get the combined crc32 value of
all the parts.</p>
<div class="refsect3">
<a name="g-mime-yencode-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>inbuf</p></td>
<td class="parameter_description"><p>input buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inlen</p></td>
<td class="parameter_description"><p>input buffer length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>outbuf</p></td>
<td class="parameter_description"><p>output buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>yencode state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pcrc</p></td>
<td class="parameter_description"><p>part crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crc</p></td>
<td class="parameter_description"><p>crc state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-yencode-close.returns"></a><h4>Returns</h4>
<p> the number of bytes encoded.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GMimeFilterYenc-struct"></a><h3>struct GMimeFilterYenc</h3>
<pre class="programlisting">struct GMimeFilterYenc;</pre>
<p>A filter for yEncoding or yDecoding a stream.</p>
<div class="refsect3">
<a name="GMimeFilterYenc.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YENCODE-CRC-INIT:CAPS"></a><h3>GMIME_YENCODE_CRC_INIT</h3>
<pre class="programlisting">#define GMIME_YENCODE_CRC_INIT       (~0)
</pre>
<p>Initial state for the crc and pcrc state variables.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YENCODE-STATE-INIT:CAPS"></a><h3>GMIME_YENCODE_STATE_INIT</h3>
<pre class="programlisting">#define GMIME_YENCODE_STATE_INIT     (0)
</pre>
<p>Initial state for the <a class="link" href="GMimeFilterYenc.html#g-mime-ydecode-step" title="g_mime_ydecode_step ()"><code class="function">g_mime_ydecode_step()</code></a> function.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-INIT:CAPS"></a><h3>GMIME_YDECODE_STATE_INIT</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_INIT     (0)
</pre>
<p>Initial state for the <a class="link" href="GMimeFilterYenc.html#g-mime-ydecode-step" title="g_mime_ydecode_step ()"><code class="function">g_mime_ydecode_step()</code></a> function.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-EOLN:CAPS"></a><h3>GMIME_YDECODE_STATE_EOLN</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_EOLN     (1 &lt;&lt; 8)
</pre>
<p>State bit that denotes the yEnc filter has reached an end-of-line.</p>
<p>This state is for internal use only.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-ESCAPE:CAPS"></a><h3>GMIME_YDECODE_STATE_ESCAPE</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_ESCAPE   (1 &lt;&lt; 9)
</pre>
<p>State bit that denotes the yEnc filter has reached an escape
sequence.</p>
<p>This state is for internal use only.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-END:CAPS"></a><h3>GMIME_YDECODE_STATE_END</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_END      (1 &lt;&lt; 15)
</pre>
<p>State bit that denoates that <a class="link" href="GMimeFilterYenc.html#g-mime-ydecode-step" title="g_mime_ydecode_step ()"><code class="function">g_mime_ydecode_step()</code></a> has finished
decoding.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-BEGIN:CAPS"></a><h3>GMIME_YDECODE_STATE_BEGIN</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_BEGIN    (1 &lt;&lt; 12)
</pre>
<p>State bit that denotes the yEnc filter has found the =ybegin line.</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-DECODE:CAPS"></a><h3>GMIME_YDECODE_STATE_DECODE</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_DECODE   (1 &lt;&lt; 14)
</pre>
<p>State bit that denotes yEnc filter has begun decoding the actual
yencoded content and will continue to do so until an =yend line is
found (or until there is nothing left to decode).</p>
</div>
<hr>
<div class="refsect2">
<a name="GMIME-YDECODE-STATE-PART:CAPS"></a><h3>GMIME_YDECODE_STATE_PART</h3>
<pre class="programlisting">#define GMIME_YDECODE_STATE_PART     (1 &lt;&lt; 13)
</pre>
<p>State bit that denotes the yEnc filter has found the =ypart
line. (Note: not all yencoded blocks have one)</p>
</div>
</div>
<div class="refsect1">
<a name="GMimeFilterYenc.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="type">GMimeFilter</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>